<?php

declare(strict_types=1);

namespace app\model;

use think\Model;
use think\facade\Db;

/**
 * @mixin \think\Model
 */
class BaseMod extends Model
{
    //快捷操作
    public static function shortcuts($data)
    {
        $res = Db::name($data['table'])->where('id', $data['id'])->update([$data['fild'] => $data['value'], 'rep_date' => time()]);
        return $res;
    }
}
